import { request } from '../http'
// 查询菜单列表
export function listMenu(params?: any) {
    return request.Get('/system/menu/list', {params})
}
// 查询菜单详细
export function getMenu(menuId: number) {
    return request.Get(`/system/menu/list/${menuId}`)
}
// 查询菜单下拉树结构
export function treeselect() {
    return request.Get('/system/menu/treeselect')
}
// 根据角色ID查询菜单下拉树结构
export function roleMenuTreeselect(roleId: number) {
    return request.Get(`/system/menu/roleMenuTreeselect/${roleId}`)
}
// 新增菜单
export function addMenu(data?: any) {
    return request.Post('/system/menu', data)
}
// 修改菜单
export function updateMenu(data?: any) {
    return request.Put('/system/menu', data)
}
// 删除菜单
export function delMenu(menuId?: any) {
    return request.Delete(`/system/menu/${menuId}`)
}